<div id="login-bar">
	<?
	if(isset($login_error)) {
    	echo $login_error->show();
    }
              
    if($user->getRole() == ROLE_PUBLIC) {
    ?>
              <form action="<? echo redirect_str(PAGE_NEWS).action(ACTION_LOGIN); ?>" method="post">
		         <label for="login_username">jméno</label><input class="text px120" type='text' maxlength="30" id='login_username' name='login_username' value="<? echo $username ?>"/>
		         <label for="login_pass">heslo</label><input class="text px120" type='password' maxlength="30" id='login_pass' name='login_pass' value="" />
		         <label for="login_remember">neodhlašovat</label><input type='checkbox' id='login_remember' name='login_remember' value="1" />
		         <input class="button preloader" onmouseover="this.className='button_hover'" onmouseout="this.className='button'" type="submit" value="PŘIHLÁSIT"/>
		         <a class="button preloader" href="<? echo redirect_str(PAGE_REGISTRATION); ?>">ZAREGISTROVAT SE</a>
              </form>
            <?
            } else {
            ?>
              <form action="<?echo redirect_str(PAGE_NEWS).action(ACTION_LOGOUT);?>" method="post">
                  <span>přihlášen </span><span class="bolded"><? echo $user->getUsername(); ?></span>
                  <a class="button preloader" href="<? echo redirect_str(PAGE_USER_PROFILE); ?>">UPRAVIT PROFIL</a>
                  <input class="button preloader" onmouseover="this.className='button_hover'" onmouseout="this.className='button'" type="submit" value="ODHLÁSIT">
              </form> 
     <?
     }
     ?>
</div>